<html>
<head>
	<meta charset="UTF-8">
	<title>数据修改窗口</title>
	<link id="easyuiTheme" href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
	<link href="../../static/easyui/themes/frameless.css" rel="stylesheet" type="text/css"/>
	<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
	<script src="../../ffres/dict/all.js" type="text/javascript"></script>
	<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
	<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
	<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
	<a href="" target="_blank" id="commonLink" name="commonLink"></a>
	<style type="text/css">
		/* div滚动条效果 */
		div.tabDiv{position:relative;text-align:center;padding-top:15px;height:210px;overflow: auto;}
		.tabDiv::-webkit-scrollbar {width: 5px;height:5px;}
		.tabDiv::-webkit-scrollbar-thumb {background-color: #CCC;} /* 滚动条的内层滑块颜色 */
		table,table tr th,table tr td{text-align:center;border: 1px solid #CCC;border-collapse:collapse;}
		table th{font-weight:normal;font-size:8px;}
		table td{font-size:8px;}
		/* 表格固定宽度、滚动展示 */
		.hd{min-width:60px;max-width:60px;overflow:hidden;white-space:nowrap;}
		.hd:hover{overflow:auto;}
		.hd::-webkit-scrollbar { width: 0px;height:0px;}
		/* 表格底部样式 */
		div.tBottom{position:relative;bottom:2px;height:25px;margin:auto;margin-top:2px;overflow: hidden;background-color: white}
		div.bottom{font-size: 8px;display: inline-block;margin:2px;}
		/* 页码效果 */
		.page{display:inline-block;bottom:0px;width:18px;height:18px;border:1px solid #CCC;line-height:18px;margin:0 auto;color:#999;text-decoration:none;}
		.page:hover{background-color:#CCC;}
		.page.on{background-color:#5173a0;color:white;}
		.hidden{display:none;}
	</style>
	<script type="text/javascript">
		var subsCode;
		var subsDsCode;

		$(function(){
			subsCode=$.getUrlParam('subsCode');
			subsDsCode=$.getUrlParam('subsDsCode');
			var jsonData={subsCode:subsCode, subsDsCode:subsDsCode};
			$.restfulPostForm('../../api/dbo/sql/get/table',jsonData,function(data){
				if(data.rows.length>0){
					var jsonTree=[{text: '数据表',name:'',value:'', state: 'open'}];
					for(var i=0;i<data.rows.length;i++){
						data.rows[i].text=data.rows[i].TABLE_NAME;
					}
					jsonTree[0].children=data.rows;
					$("#tt").tree({
						data:jsonTree,
						onClick: function(node){
							addTab(node.text,'DataModify.html');
						}
					});
				} else{
					$.messager.alert('提示','当前系统数据源为空！','info');
				}
			});
		});

		function addTab(title, url){
			if ($('#tab').tabs('exists', title)){
				$('#tab').tabs('select', title);
			} else {
				var content = '<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:100%;"></iframe>';
				$('#tab').tabs('add',{
					title:title,
					content:content,
					closable:true
				});
			}
		}

	</script>
</head>
<body class="easyui-layout">
<div data-options="region:'west',title:'数据源列表'" style="width:270px;padding:1px;">
	<ul id="tt" class="easyui-tree"data-options="animate:true,lines:true">
	</ul>
</div>
<div data-options="region:'center',title:''" >
	<div class="easyui-panel" data-options="region:'center', border:'false'" style="height:99%">
		<div id="tab" class="easyui-tabs" fit="true" border="false" style="width:100%;height:95%">

		</div>
	</div>
</div>
</body>
</html>
